(function ($) {
    "use strict";

    jQuery(document).ready(function ($) {
        var wWidth = $(window).width();


        //-----menu------
        $("#navigation").navigation({
            effect: "fade",
            submenuTrigger: "hover",
            mobileBreakpoint: 991,
            offCanvasSide: "right"
        });


        //----venobox----
        // $('.watch_video').venobox();
        // $('#portfolio_vid').venobox();

        /*--------parallax--------*/
        // if (wWidth > 767) {
        //     $('.hero_area_v6').parallax("50%", 0.3);
        //     $('.drone_feature_section').parallax("50%", 0.3);
        //     $('.drone_video_section').parallax("50%", 0.3);
        //     $('.newsletter_section').parallax("50%", 0.3);
        // }

        //-------------fun facts active---------------
        // $('.counter').counterUp({
        //delay: 10, // the delay time in ms
        //time: 800 // the speed time in ms
        //});

    });


    /* ---------------------
    Mouse Move
    ----------------------- */
    $('.hero_area_v8').mousemove(function (e) {
        var x = -(e.pageX + this.offsetLeft) / 50;
        var y = -(e.pageY + this.offsetTop) / 50;
        $(this).css('background-position', x + 'px ' + y + 'px');
    });

    //------Adjusting the top nav showing the top nav when scrolling >= 53----
    var wHight = $(window).height();
    $(window).on('scroll', function () {
        var check = $('#logo2');
        if ($(this).scrollTop() > 0) {
            $(".header").addClass("sticked animated fadeInDown");

        } else {
            $(".header").removeClass("sticked animated fadeInDown");
        }

        if (wWidth > 767) {
            if ($(this).scrollTop() >= wHight) {
                $("#category_fixed").addClass("sticked");
                $(".topCourse_section").addClass("stickMargin");
            } else {
                $("#category_fixed").removeClass("sticked");
                $(".topCourse_section").removeClass("stickMargin");
            }
        }
    });


    //--------Scroll Top---------
    // $(window).scroll(function () {
    //     if ($(this).scrollTop() > 400) {
    //         $('.scroll-fixed').fadeIn();
    //         $('.scroll-fixed').removeClass('not_visible');
    //     } else {
    //         $('.scroll-fixed').fadeOut();
    //     }
    // });
    $('.scroll_top').on('click', function (event) {
        event.preventDefault();
        $('html, body').animate({
            scrollTop: 0
        }, 1500);
    });
    //=----Hide arrow--------
    var wWidth = $(window).width();
    if (wWidth < 767) {
        $('.slick-arrow').hide()
    }


}(jQuery));